package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallSpecificTemplate;
import com.appkubes.mall.core.po.MallSpecificTemplateExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallSpecificTemplateMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_template
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallSpecificTemplateSqlProvider.class, method="countByExample")
    long countByExample(MallSpecificTemplateExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_template
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallSpecificTemplateSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallSpecificTemplateExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_template
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_specific_template",
        "where specific_template_key = #{specificTemplateKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String specificTemplateKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_template
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_specific_template (specific_template_key, app_key, ",
        "category_key, template_name, ",
        "template_index)",
        "values (#{specificTemplateKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{categoryKey,jdbcType=VARCHAR}, #{templateName,jdbcType=VARCHAR}, ",
        "#{templateIndex,jdbcType=INTEGER})"
    })
    int insert(MallSpecificTemplate record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_template
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallSpecificTemplateSqlProvider.class, method="insertSelective")
    int insertSelective(MallSpecificTemplate record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_template
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallSpecificTemplateSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="specific_template_key", property="specificTemplateKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="category_key", property="categoryKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="template_name", property="templateName", jdbcType=JdbcType.VARCHAR),
        @Result(column="template_index", property="templateIndex", jdbcType=JdbcType.INTEGER)
    })
    List<MallSpecificTemplate> selectByExampleWithRowbounds(MallSpecificTemplateExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_template
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallSpecificTemplateSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="specific_template_key", property="specificTemplateKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="category_key", property="categoryKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="template_name", property="templateName", jdbcType=JdbcType.VARCHAR),
        @Result(column="template_index", property="templateIndex", jdbcType=JdbcType.INTEGER)
    })
    List<MallSpecificTemplate> selectByExample(MallSpecificTemplateExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_template
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "specific_template_key, app_key, category_key, template_name, template_index",
        "from mall_specific_template",
        "where specific_template_key = #{specificTemplateKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="specific_template_key", property="specificTemplateKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="category_key", property="categoryKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="template_name", property="templateName", jdbcType=JdbcType.VARCHAR),
        @Result(column="template_index", property="templateIndex", jdbcType=JdbcType.INTEGER)
    })
    MallSpecificTemplate selectByPrimaryKey(String specificTemplateKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_template
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallSpecificTemplateSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallSpecificTemplate record, @Param("example") MallSpecificTemplateExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_template
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallSpecificTemplateSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallSpecificTemplate record, @Param("example") MallSpecificTemplateExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_template
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallSpecificTemplateSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallSpecificTemplate record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_template
     *
     * @mbg.generated
     */
    @Update({
        "update mall_specific_template",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "category_key = #{categoryKey,jdbcType=VARCHAR},",
          "template_name = #{templateName,jdbcType=VARCHAR},",
          "template_index = #{templateIndex,jdbcType=INTEGER}",
        "where specific_template_key = #{specificTemplateKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallSpecificTemplate record);
}